<?php
 ob_start();
?>
<div class="modal listing-modal">
	<div class="modal-header">
		<button type="button" class="close freevf_close">&times;</button>
		<h3><?php _e('Free Stock Images - Add Images to Blog Posts', FVF_TED );?></h3>
    </div>
    <div class="modal-body">
		<div class="search-caption fn-clear">
			<div class="image-wall-search">
		         <form action="<?php echo admin_url('admin-ajax.php?action=freevf_proxy&show=search&post_id='.$post_id);?>" method="post" >
					<input type="text" name="r[keyword]" class="search-input" value="<?php echo $js_cnt['keyword'];?>"  />
					<input type="hidden" name="r[page]" value="1" >
					<button class="search-submit" type="submit"><?php _e('Search', FVF_TED );?></button>
			</div>
			<!-- image-wall-search end -->

			<select class="form-control" name="r[color]">
				<option value="all" <?php if( 'all' == $color ) {?> selected <?php }?> ><?php _e('All Color', FVF_TED);?></option>
				<option value="red" <?php if( 'red' == $color ) {?> selected <?php }?> ><?php _e('Red', FVF_TED);?> </a>
				<option value="orange" <?php if( 'orange' == $color ) {?> selected <?php }?> > <?php _e('Orange',FVF_TED);?></a>
				<option value="yellow" <?php if( 'yellow' == $color ) {?> selected <?php }?>  > <?php _e('Yellow', FVF_TED);?></a>
				<option value="green" <?php if( 'green' == $color ) {?> selected <?php }?>  > <?php _e('Green', FVF_TED);?></a>
				<option value="aqua" <?php if( 'aqua' == $color ) {?> selected <?php }?>  > <?php _e('Aqua',FVF_TED );?> </a>
				<option value="blue" <?php if( 'blue' == $color ) {?> selected <?php }?>  > <?php _e('Blue', FVF_TED);?></a>
				<option value="purple" <?php if( 'purple' == $color ) {?> selected <?php }?>  > <?php _e('Purple', FVF_TED );?></a>
				<option value="pink"   <?php if( 'pink' == $color ) {?> selected <?php }?>  > <?php _e('Pink', FVF_TED);?> </a>
				<option value="brown"  <?php if( 'brown' == $color ) {?> selected <?php }?>  > <?php _e('Brown', FVF_TED);?> </a>
				<option value="white"  <?php if( 'white' == $color ) {?> selected <?php }?> > <?php _e('White', FVF_TED );?></a>
				<option value="black"  <?php if( 'black' == $color ) {?> selected <?php }?> > <?php _e('Black', FVF_TED);?></a>
			</select>
		  </form>
		</div>
		<!-- // search-caption end -->

		<div class="listing-wrapper">
			<ul class="thumbnail-group fn-clear">
			  <?php
                 if( $pics  && is_array( $pics) && count($pics ) ){
                   foreach( $pics as $vp ){
			  ?>
				<li>
					<a href="<?php echo admin_url('admin-ajax.php?action=freevf_proxy&show=detail&npage=search&imgId='.$vp['id']).'&'.$_url;?>" alt="<?php echo $vp['title'];?>">
						<span class="thumbnail-img">
						   <img class="freevf_li_img" style="margin: -<?php echo ($vp['thumb_height']/2); ?>px 0 0 -<?php echo $vp['thumb_height']/2;?>px;" src="<?php echo $vp['thumb_url'];?>" alt="<?php echo $vp['title'];?>" />
					   </span>
					</a>
				</li>
              <?php
                }
               }
              ?>
			</ul>
			<!-- // thumbnail-group end -->
		</div>
		<!-- // search-wrapper end -->
    </div>
	<div class="modal-footer">
		<a href="<?php echo admin_url('admin-ajax.php?action=freevf_proxy&show=index&post_id='.$post_id);?>" class="btn fn-left"><?php _e('Back to Homepage', FVF_TED );?></a>

		<div class="pagination fn-right">
		   <?php echo $pagestr;?>
		</div>
		<!-- // pagination end -->
    </div>
 </div>
<!-- modal.homepage-modal end -->
<script type="text/javascript">
jQuery(document).ready( function( $ ) {
   $('img .freevf_li_img').lazyload();
 });
</script>
<?php
 $_maintpl=ob_get_contents();
ob_end_clean();
?>